<!DOCTYPE html>
<html class="h-100" xmlns:th="http://www.thymeleaf.org">
<head>
	<title>Apache POI - List Products</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<link rel="stylesheet" href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css"/>
	<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.min.js"></script>
	<script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
	<style>
		main > .container {
			padding: 60px 15px 0;
		}
		.footer {
			background-color: #f5f5f5;
		}
	</style>
</head>
<body class="d-flex flex-column h-100">
<header>
	<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
		<a class="navbar-brand" th:href="@{/}">Apache POI</a>
		<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
			<span class="navbar-toggler-icon"></span>
		</button>
		<div class="collapse navbar-collapse" id="navbarsExampleDefault">
			<ul class="navbar-nav mr-auto">
				<li class="nav-item active">
					<a class="nav-link" th:href="@{/}">Home <span class="sr-only">(current)</span></a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="https://github.com/T5750/poi" target="_blank">GitHub</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="https://t5750.github.io/" target="_blank">Blog</a>
				</li>
			</ul>
		</div>
	</nav>
</header>
<main role="main" class="flex-shrink-0">
	<div class="container">
		<h4 class="mt-5">Product List</h4>
		<div th:if="${not #lists.isEmpty(products)}">
			<table class="table table-striped">
				<tr>
					<th>Id</th>
					<th>Description</th>
					<th>Price</th>
					<th>Image URL</th>
					<th>List</th>
					<th>Edit</th>
					<th>Delete</th>
				</tr>
				<tr th:each="product : ${products}">
					<td th:text="${product.id}"></td>
					<td th:text="${product.description}"></td>
					<td th:text="${product.price}"></td>
					<td th:text="${product.imageUrl}"></td>
					<td><a th:href="${'/product/show/' + product.id}">View</a></td>
					<td><a th:href="${'/product/edit/' + product.id}">Edit</a></td>
					<td><a th:href="${'/product/delete/' + product.id}">Delete</a></td>
				</tr>
			</table>
		</div>
		<div>
			<a class="btn btn-outline-primary" th:href="@{/product/new}" role="button">New Product</a>
			<a class="btn btn-outline-primary" th:href="@{/product/excelImport}" role="button">Import Products</a>
			<a class="btn btn-outline-primary" th:href="@{/product/export}" role="button">Export Products</a>
		</div>
		<h4 class="mt-3">Older</h4>
		<div>
			<a class="btn btn-outline-primary" th:href="@{/excel/read/testRead}" role="button">Read testRead.xls</a>
			<a class="btn btn-outline-primary" th:href="@{/excel/export/default}" role="button">Export book.xls</a>
			<a class="btn btn-outline-primary" th:href="@{/excel/export2007/default}" role="button">Export export2007.xls</a>
			<a class="btn btn-outline-primary" th:href="@{/excel/template/template}" role="button">Export template.xls</a>
			<a class="btn btn-outline-primary" th:href="@{/excel/replace/replaceTemplate}" role="button">Export replaceTemplate.xls</a>
		</div>
	</div>
</main>
<footer class="footer mt-auto py-3">
	<div class="container">
		<span class="text-muted">© 2019 <a href="https://github.com/T5750" target="_blank">T5750</a></span>
	</div>
</footer>
</body>
</html>